﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewData["Title"] - 后台管理系统</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="~/css/login.css" asp-append-version="true" />
</head>
<body>
    <div class="container">
        <div class="left-panel">
            <div class="logo mb-3">
                <i class="login-logo"></i>
                欣欣志盛
            </div>
            <h1 class="mb-3">后台管理系统</h1>

            <p class="panel-subtitle mb-sm-3">高效、安全、可靠的后台管理系统解决方案，帮助您轻松管理企业资源，提高工作效率。</p>

            <div class="features">
                <div class="feature">
                    <i class="login-ico login-ico-shield"></i>
                    <span>企业级安全保障</span>
                </div>
                <div class="feature">
                    <i class="login-ico login-ico-bolt"></i>
                    <span>高性能数据处理</span>
                </div>
                <div class="feature">
                    <i class="login-ico login-ico-sync-alt"></i>
                    <span>实时数据同步</span>
                </div>
                <div class="feature">
                    <i class="login-ico login-ico-chart-line"></i>
                    <span>智能数据分析</span>
                </div>
            </div>
        </div>

        <div class="right-panel">
            <div class="form-container">
                @RenderBody()
            </div>
        </div>
    </div>
    <!-- 消息提示模态框 -->
    <div class="modal fade custom-modal" id="messageModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="modalTitle">系统提示</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <p id="modalMessage">这是一条系统提示消息</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary btn-modal" data-bs-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script type="text/javascript">
        // 初始化Bootstrap模态框
        const messageModal = new bootstrap.Modal(document.getElementById('messageModal'), {
            keyboard: false, //禁止键盘触发模态框
        });

        // 存储回调函数
        let modalCallback = null;

        // 显示模态框函数
        function showMessage(title, message, callback = null) {
            document.getElementById('modalTitle').textContent = title;
            document.getElementById('modalMessage').textContent = message;

            // 存储回调函数
            modalCallback = callback;

            // 显示模态框
            messageModal.show();
        }

        // 监听模态框关闭事件
        document.getElementById('messageModal').addEventListener('hidden.bs.modal', function () {
            // 执行回调函数（如果存在）
            if (modalCallback && typeof modalCallback === 'function') {
                modalCallback();
            }
            // 重置回调函数
            modalCallback = null;
        });
    </script>
    @await RenderSectionAsync("Scripts", required: false)
</body>
</html>